<?php
App::uses('AppController', 'Controller');
/**
 * Faqs Controller
 *
 * @property Faq $Faq
 */
class FaqsController extends AppController {

/**
 * index method
 *
 * @return void
 */
	public function index() {
		$this->Faq->recursive = 0;
		$this->set('faqs', $this->Faq->find('all'));

		$this->loadModel('Article');
		$this->Article->recursive = -1;
        $cond = array('conditions' => array('category_id' => 1), 'order' => 'created_date DESC', 'limit' => 5);
        $this->set('articleLastest', $this->Article->find('all', $cond));
	}
    
    public function setLanguage() {
        $this->autoRender = false;
        $this->Session->write('Config.language', $this->request->data['lang']);
        $this->response->body(1);
    }
}
